package top.maochang.hou.service.impl;


import org.apache.shiro.authc.AuthenticationInfo;
import top.maochang.hou.service.SecurityService;
import top.maochang.hou.tools.DigestsUtil;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class SecurityServiceImpl implements SecurityService {
    @Override
    public Map<String,String> findPasswordByLoginName(String loginName) {
        return DigestsUtil.entryptPassword("123");
    }

    @Override
    public List<String> findRoleByLoginName(String loginName) {
        List<String> list = new ArrayList<>();
        list.add("admin");
        list.add("dev");
        return list;
    }

    @Override
    public List<String> findPermissionByLoginName(String loginName) {
        List<String> list = new ArrayList<>();
        list.add("order:add");
        list.add("order:list");
        list.add("order:del");
        //AuthenticationInfo authenticationInfo=new AuthenticationInfo();
        return list;
    }
}
